package com.xx.doublexchat.common.user.service;

import com.xx.doublexchat.common.common.domain.vo.request.CursorPageBaseRequest;
import com.xx.doublexchat.common.common.domain.vo.request.PageBaseRequest;
import com.xx.doublexchat.common.common.domain.vo.response.CursorPageBaseResponse;
import com.xx.doublexchat.common.common.domain.vo.response.PageBaseResponse;
import com.xx.doublexchat.common.user.domain.entity.FriendApplyResponse;
import com.xx.doublexchat.common.user.domain.entity.UserFriend;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xx.doublexchat.common.user.domain.vo.request.FriendApplyRequest;
import com.xx.doublexchat.common.user.domain.vo.request.FriendApproveRequest;
import com.xx.doublexchat.common.user.domain.vo.request.FriendCheckRequest;
import com.xx.doublexchat.common.user.domain.vo.response.FriendCheckResponse;
import com.xx.doublexchat.common.user.domain.vo.response.FriendResponse;
import com.xx.doublexchat.common.user.domain.vo.response.FriendUnreadResponse;

import java.util.List;

/**
 * <p>
 * 用户联系人表 服务类
 * </p>
 *
 * @author xiaoXuan
 * @since 2024-02-21
 */
public interface IUserFriendService {

    /**
     * 查找好友列表
     * @param uid
     * @param request
     * @return
     */
    CursorPageBaseResponse<FriendResponse> friendList(Long uid, CursorPageBaseRequest request);

    /**
     * 校验是否为自己好友
     * @param uid
     * @param request
     * @return
     */
    FriendCheckResponse check(Long uid, FriendCheckRequest request);

    /**
     * 申请好用
     * @param uid
     * @param request
     */
    void apply(Long uid, FriendApplyRequest request);

    /**
     * 同意申请
     * @param uid
     * @param request
     */
    void applyApprove(Long uid, FriendApproveRequest request);

    /**
     * 好友申请列表
     * @param uid
     * @param request
     * @return
     */
    PageBaseResponse<FriendApplyResponse> pageApplyFriend(Long uid, PageBaseRequest request);

    /**
     * 申请好友未读数
     * @param uid
     * @return
     */
    FriendUnreadResponse unread(Long uid);

    /**
     * 删除好友
     * @param uid
     * @param targetUid
     */
    void deleteFriend(Long uid, Long targetUid);
}
